<?php
/**
 * Copyright (C), 2016-2018, Shall Buy Life info. Co., Ltd.
 * FileName: CodeMessageConstant.php
 * Description:返回契约
 *
 * @author lwl
 * @Create Date    2020/7/16 14:23
 * @Update Date    2020/7/16 14:23 By lwl
 * @version v1.0
 */

namespace Example\Constants;

use Illuminate\Http\Response;

interface CodeMessageConstant
{
    const OPEN = 1; //开启
    const CLOSE = -1; //关闭
    const ACCESS_STRING = 'access.rights.001';
//    const ERROR_STAFF_NOT_LOGIN = ['code' => Response::HTTP_UNAUTHORIZED, 'message' => '后台未登录'];
    const ERROR_NO_ACCESS = ['code' => Response::HTTP_FORBIDDEN, 'message' => '无访问权限'];
    const ERROR_SIGNATURE_VERIFY_FAILED = ['code' => 4000002, 'message' => '验签失败'];
//    const ERROR_VALIDATION_FAILURE = ['code' => 4000003, 'message' => '签名验证失效'];
//    const ERROR_REQUEST_TIMEOUT = ['code' => Response::HTTP_REQUEST_TIMEOUT, 'message' => '请求超时'];
//    const ERROR_ACCESS_STATUS_OFF = ['code' => 4000005, 'message' => '用户状态在显示中，不可编辑或删除'];

    //const ERROR_ACCESS_ADD_EXITS = ['code' => 4000005, 'message' => '添加用户权限失败'];



    //常用返回文案 统一使用这
    const ERROR_DATA_NOT_EXISTS = ['code' => Response::HTTP_NOT_FOUND, 'message' => '数据不存在'];
    const ERROR_DATA_EXISTS= ['code' => Response::HTTP_BAD_REQUEST, 'message' => '数据已存在'];
    const ERROR_OPERATION_FAIL = ['code' => Response::HTTP_BAD_REQUEST, 'message' => '操作失败'];
    const ERROR_NOT_OPERATION = ['code' => Response::HTTP_BAD_REQUEST, 'message' => '不可操作'];
    const ERROR_FORM_FAILURE = ['code' => Response::HTTP_BAD_REQUEST, 'message' => '表单失效'];


}
